﻿using System;
using System.Collections.Generic;

namespace Topro.Application.Interface
{
    using Topro.Entity;
    using Topro.Entity.Request.Login;
    using Topro.Entity.Response.Home;
    using Topro.Entity.Response.Login;
    using Topro.Entity.Response.Menu;
    using Topro.Entity.Response.Merchant;

    /// <summary>
    /// 登录接口
    /// </summary>
    public interface LoginService
    {
        /// <summary>
        /// 获取用户
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        UserResponse Get(int id);


        /// <summary>
        /// 获取用户
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        UserResponse GetByAccount(string account);


        /// <summary>
        /// 获取用户的菜单
        /// </summary>
        /// <param name="userId">用户编号</param>
        List<MenuResponse> GetMenus(int userId);

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult<LoginResponse> Login(LoginRequest request);

        /// <summary>
        /// 获取权限
        /// </summary>
        /// <param name="userId">用户编号</param>
        /// <returns></returns>
        UserAuthResponse GetAuth(int id);
    }
}
